From f1d9a308f61e67f4c896608e73ac8413f61fa8af Mon Sep 17 00:00:00 2001 From: Rafi Zadanly Date: Wed, 11 Oct 2023 10:22:11 +0700 Subject: Add breadcrumb on detail product, search, brand, category page --- src/pages/shop/category/[slug].jsx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/pages/shop/category/[slug].jsx') diff --git a/src/pages/shop/category/[slug].jsx b/src/pages/shop/category/[slug].jsx index dbc17c06..e3650235 100644 --- a/src/pages/shop/category/[slug].jsx +++ b/src/pages/shop/category/[slug].jsx @@ -3,6 +3,7 @@ import { getIdFromSlug, getNameFromSlug } from '@/core/utils/slug' import { useRouter } from 'next/router' import _ from 'lodash' import Seo from '@/core/components/Seo' +import Breadcrumb from '@/lib/category/components/Breadcrumb' const BasicLayout = dynamic(() => import('@/core/components/layouts/BasicLayout')) const ProductSearch = dynamic(() => import('@/lib/product/components/ProductSearch')) @@ -16,6 +17,7 @@ export default function CategoryDetail() { const query = { fq: `manufacture_id_i:${categoryId}` } + return ( + + {!_.isEmpty(router.query) && ( )} -- cgit v1.2.3 From 7ada2eab1773629a3f74fe1a16ba78227953f912 Mon Sep 17 00:00:00 2001 From: "HATEC\\SPVDEV001" Date: Sat, 14 Oct 2023 09:03:10 +0700 Subject: add fillterby brand di kolom pencarian --- src/pages/shop/category/[slug].jsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/pages/shop/category/[slug].jsx') diff --git a/src/pages/shop/category/[slug].jsx b/src/pages/shop/category/[slug].jsx index e3650235..6d3985a8 100644 --- a/src/pages/shop/category/[slug].jsx +++ b/src/pages/shop/category/[slug].jsx @@ -14,8 +14,12 @@ export default function CategoryDetail() { const categoryName = getNameFromSlug(slug) const categoryId = getIdFromSlug(slug) + const q = router?.query.q || null const query = { - fq: `manufacture_id_i:${categoryId}` + fq: `category_id_i:${categoryId}` + } + if (q) { + query.q = q } return ( -- cgit v1.2.3